Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

158
Vistas
What is "//= require" in a JavaScript file in a Rails app?

I'm looking at the source code of a Ruby on Rails app. Several of the JavaScript (*.js and *.es6) files in the source have one or more lines at the top of the file like:

//= require path/to/some_other_js_file

What are these lines called, and what are they doing?

(Potentially helpful SEO for folks who may be searching for a question like this, as I myself did prior to asking: slash slash equals require; double slash equals require)

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

These are "Sprockets directives," part of the Rails Asset Pipeline, part of how Rails performs combining and fingerprinting of JavaScript and CSS assets.

See https://guides.rubyonrails.org/asset_pipeline.html, in particular section 2.4 Manifest Files and Directives.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda